Propagate marked attributes from method type parameters to type parameters of synthesized types.#76492
Merged
AlekseyTs merged 4 commits intodotnet:features/GeneratedCodeAttributesfrom Dec 26, 2024
Conversation
…eters of synthesized types.. Related to dotnet#73920.
7cdb07f to
75f0fd4
Compare
Contributor
Author
|
@dotnet/roslyn-compiler Please review |
1 similar comment
Contributor
Author
|
@dotnet/roslyn-compiler Please review |
333fred
approved these changes
Dec 20, 2024
Contributor
Author
|
@dotnet/roslyn-compiler For the second review |
cston
reviewed
Dec 20, 2024
| } | ||
|
|
||
| internal sealed class SourceMethodTypeParameterSymbol : SourceTypeParameterSymbolBase | ||
| internal abstract class SourceMethodTypeParameterSymbol : SourceTypeParameterSymbol |
Contributor
Contributor
Author
There was a problem hiding this comment.
What does this refactoring enable?
All implementations of method type parameters in source have a common base distinct from the base of type type parameters
cston
reviewed
Dec 20, 2024
| internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes) | ||
| { | ||
| if (ContainingSymbol.Kind == SymbolKind.NamedType && | ||
| _underlyingTypeParameter.OriginalDefinition is SourceMethodTypeParameterSymbol && |
Contributor
Contributor
Author
There was a problem hiding this comment.
is SourceMethodTypeParameterSymbol
Consider capturing in a local and reusing below:
is SourceMethodTypeParameterSymbol underlyingDefinition
I'll make this adjustment in the next PR
cston
approved these changes
Dec 20, 2024
e416d99
into
dotnet:features/GeneratedCodeAttributes
24 checks passed
checkedsums
pushed a commit
to checkedsums/roslynjourneys
that referenced
this pull request
Jan 5, 2025
…eters of synthesized types. (dotnet#76492) Related to dotnet#73920.
This was referenced Jan 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #73920.